package com.ruoyi.web.controller.operation;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.vo.ContractTemplateVO;
import com.ruoyi.system.service.IContractTemplateService;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ProjectName: back
 * @Package: com.ruoyi.web.controller.operation
 * @ClassName: ContractTemplateController
 * @Author: haiyue
 * @Description:
 * @Date: 2025/5/14 下午 2:11:35
 * @Version: 1.0
 */
@Api(description = "平台运营管理-合同模版管理")
@RestController
@RequestMapping("/system/contractTemplate")
public class ContractTemplateController {
    @Autowired
    private IContractTemplateService contractTemplateService;

    /**
     * 平台运营管理-合同模板列表
     */
    @ApiOperation("平台运营管理使用-合同模板列表")
    @GetMapping("/list")
    public AjaxResult list(@RequestParam(required = false) String templateName) throws TencentCloudSDKException {
        List<ContractTemplateVO> list = contractTemplateService.contractTemplateList(templateName);
        return AjaxResult.success(list);
    }
}
